package com.augurit.wf.common.tag.opinion;

import java.io.Writer;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.struts2.components.Component;

import com.opensymphony.xwork2.util.ValueStack;

import de.odysseus.el.tree.Tree;

public class WfOpinion extends Component{
	private String opinions;
	
	public WfOpinion(ValueStack arg0){
		super(arg0);
	}
	
	@Override
	public boolean start(Writer arg0) {
		boolean result = super.start(arg0);
		try {
			StringBuilder str = new StringBuilder();
			
			if(opinions != null){
				str.append(opinions);
			}
				
			arg0.write(str.toString());
		} catch (Exception e) {
			Logger.getLogger(Tree.class.getName()).log(Level.WARN, null, e);
		}
		return result;
	}

	public String getOpinions() {
		return opinions;
	}

	public void setOpinions(String opinions) {
		this.opinions = opinions;
	}

}
